package com.seek.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.seek.cache.CacheManager;

/**
 * 系统缓存加载监听器
 * 用于系统启动加载系统缓存
 * <ul>
 * <li>
 * <b>修改历史：</b><br/>
 * <p>
 * [2015-9-10上午9:25:31]涂小炼<br/>
 * 新建
 * </p>
 * </li>
 * </ul>
 */
public class CacheListener implements ServletContextListener {

	private Logger logger = LoggerFactory.getLogger(this.getClass());
	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
	}

	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		logger.info("==============系统初始化开始======================");
		CacheManager.getInstance().init();
//		OperStatsCountQuartz countJob = (OperStatsCountQuartz) SpringContextHolder.getBean("countJob");
//		countJob.run();
		logger.info("==============系统初始化结束======================");
	}

}
